home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sounds Terrific 1
/
Sounds Terrific CD (1994)(Weird Science)(Disc 2 of 2)[!][Amiga-PC].iso
/
modules
/
p
/
puny02.mod
< prev
next >
Wrap
Text File
|
1994-08-04
|
6KB
|
171 lines
Variable pause string modification -
Punisher #1 @2402
Mon Dec 09 15:26:39 1991
PUNY02.MOD - Creation of a dynamic pause string
By: Punisher 1@2402 [Bunch 'o Bull]
Date: December 9th, 1991
Time: It takes about ten minutes to install and compile.
WWIV: WWIV 4.20
Files: VARDEC.H, bbsutl1.c, bbs.c
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This is a very handy modifcation. It adds a lot to a BBS to customize the text
display. As set up by Wayne Bell, WWIV uses [PAUSE] to ask for a keypress. To
me, this seemed a little boring, so I changed it to something a little more
interesting. ([cows]) I decided it would be worth it to make a modification
so that I could change the pause string whenever I wanted.
Basically what it does is this - it creates another field in the dynamic system
record that is saved and updated every time a user logs off. The pause string
is changed by pressing '%' at the WFC or by using the '//PAUSEEDIT' command at
the main menu. Anybody with sysop access can change the pause string.
(That's how I have it set up on _my_ system.. you can, of course, change it to
whatever your system might require.)
On my system I have a modification called "BACKSPAC.412" (by Goose) installed
that affects the inli function. The reason I mention this is because my system
allows color in the inli function using Ctrl-P and I'm not sure whether the
standard inli allows this. THE POINT IS THIS: If you install this modification
only to discover that you can't use color when making your pause prompt, you
can do one of two things to remedy the problem: A) You can place some ansic
statements in the void pausescr function I provide or B) you can get the mod
by Goose and install it. It's good.
One more quick thing - if you have users in 40 column mode you should be careful
not to make your pause string over 40 actual characters in length. If you make
it more than 40 you'll have a lot of unhappy Commodore users..
Here's the modification:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
STEP 1:
Back up your source. Do it. I lost my whole source once because I didn't back
it up. It was a pain. Back up your source.
STEP 2:
Load up VARDEC.H. Here's a listing of my code; a line beginning with '%'
already exists.. a line beginning with '+' you should add into the code.
% #define QSCN(i) (thisuser.qscnptr[i])
% #endif
%
+ #define MAXLEN_PAUSE 60 /* Add this line for PUNY02.MOD */
%
% /****************************************************************************/
%
%
% /* DATA FOR EVERY USER */
Now search for "net_req_free". Here's a listing of my code with the same key:
% long last_connect, /* date last connect.net */
% last_bbslist; /* date last bbslist.net */
% float net_req_free; /* net free factor def 3 */
% char res[31]; /* RESERVED */
+ char pausestring[MAXLEN_PAUSE];/* Added for dynamic pause */
%
% } statusrec;
That's all you have to do in VARDEC.H - save the file now.
STEP 3:
Load up BBSUTL1.C. Go to the very end of the file and block read in this
function:
void change_pausestring()
/* This function added for PUNY02.MOD - the dynamic pause string. */
{
char def[MAXLEN_PAUSE];
strcpy(def,status.pausestring);
ansic(0);
npr("Current pause string - %s\r\n", status.pausestring);
npr("Enter the new pause string.. maximum %d characters:\r\n", MAXLEN_PAUSE);
npr("Remember that each time you change color it counts as two characters.");
npr("\r\n\r\n");
inli(status.pausestring, def, MAXLEN_PAUSE, 1);
nl();
npr("The new pausestring: \r\n\r\n");
pausescr();
}
Save BBSUTL1.C.
STEP 4:
Load BBS.C. Search for ""BOARDEDIT"". Here's a listing of my code with the
same key:
% if (so()) {
% if (strcmp(s,"BOARDEDIT")==0) {
% sysoplog("@ Ran Boardedit");
% boardedit();
% }
+ if (strcmp(s,"PAUSEEDIT")==0) { /* This code added with PUNY02.MOD */
+ change_pausestring();
+ sprintf(s,"@ Changed pause to [%s].", status.pausestring);
+ sysoplog(s);
+ strcpy(s,"PAUSEEDIT");
+ }
% if (strcmp(s,"DIREDIT")==0) {
Now search for "Log on?". This will take you to the WFC case list. Here's a
list of my code (this case could be added anywhere in the case list):
% }
% break;
+ case '%': /* or any other unused character */
+ change_pausestring(); /* This code added with PUNY02.MOD */
+ break;
% case ' ':
% outs("Log on? ");
% d=timer();
That's it. Save BBS.C.
STEP 5:
Re-compile your BBS program, which has been improved 329182739%. It will take
a while to re-compile since VARDEC.H was modified; it will have to re-compile
everything. That's ok.. have a beer.
Standard disclaimer: "It ain't mah fault."
Enjoy the modification! If you use any of my modifications, please take the
time to send me some e-mail. (If you're a WWIVnet type person, that is.) My
net address is 1 @2402. Thanks very much.
Puny
(This modification is dedicated to the new Red Hot Chili Peppers' album,
"BloodSugarSexMagik", a true masterpiece.)